package com.wxc;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Objects;

/**
 * @author wxc
 * @date 2021年08月18日 9:49 AM
 */
@Data
@AllArgsConstructor
public class Person {
	private String name;
	private int id;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		Person person = (Person) o;
		return id == person.id && Objects.equals(name, person.name);
	}

	@Override
	public int hashCode() {
		return Objects.hash(name, id);
	}
}
